module.exports = {
  base: '/note/',
  dest: 'docs',
  title: '林哒-技术博客',
  description: '随便记录一下吧',
  theme: "reco",
  locales: {
      '/': {
        "lang": 'zh-CN'
      }
  },
  themeConfig: {
    sidebarDepth: 3,
    navBar: true,
    lastUpdated: '最近更新',
    nav: [
      {
        text:'面试题总结',
        items:[
          {text: 'htmlCss', link: '/interview/htmlCss'},
          {text: 'js', link: '/interview/js'},
          {text: 'ts', link: '/interview/ts'},
          {text: 'vue2', link: '/interview/vue2'},
          {text: 'vue3', link: '/interview/vue3'},
          {text: 'react', link: '/interview/react'},
          {text: 'webpack', link: '/interview/webpack'},
          {text: 'vite', link: '/interview/vite'},
          {text: 'vue2-or-vue3-diff', link: '/interview/vue2-or-vue3-diff'},
          {text: 'harmonyOS', link: '/interview/harmonyOS'}
        ]
      },
      {
        text:'editTable',
        items: [
          {text: '组件讨论',link:'/editTable/1.md'},
          {text: 'handsontable', link: '/editTable/2.md'},
          {text: '示例', link: '/editTable/3.md'},
          {text: '前端讨论', link: '/editTable/4.md'}
        ]
      },
      {
        text: '基础',
        items: [
          { text: '基础题', link: '/basis/basis' },
          { text: '解决跨域', link: '/basis/CrossDomain' },
          { text: 'vueRouter模式的区别', link: '/vue/1.md' },
          { text: 'defer和async', link: '/basis/1.md' },
          { text: 'CommonJS 和es6模块的区别', link: '/basis/2.md' },
          { text: '基础', link: '/note/webpack/1.md' },
          { text: 'nuxt搭建', link: '/nuxt/1.md' },
          { text: 'git常用 ',link:'/git/2.md'}
        ]
      },
      {
        text: '日常整理',
        items: [
          { text: 'markdown语法', link: '/share/md' },
          { text: '环境配置', link: '/share/env' },
          { text: 'git cz提交配置', link: '/share/git-cz' },
          { text: 'JS基础', link: '/js/1' },
          { text: 'SEO解决方案', link: '/share/seo' },
        ]
      },
      {
        text: '技术积累',
        items: [
          { text: '常用方法', link: '/accumulate/1' },
          { text: '缓存问题', link: '/accumulate/cache' },
          { text: '问题整理', link: '/javaScript/array1' },
          { text: '输入url到页面呈现', link: '/openUrl/1' },
          { text: '手把手教你深浅拷贝', link: '/copy/1' },
          { text: '初步了解Vue3.0中diff算法的优化', link: '/diff/1' },
          { text: '图标选择器', link: '/iconPicker/1' }
        ]
      },
      {
        text: '常用网址',
        link: '/url/fe'
      }
    ],
    sidebar: {
      '/accumulate/': genSidebarConfig('常用方法', ['1', '2', '3', '4']),
      '/js/': genSidebarConfig('JS基础', ['1', '2', '3', '4', '5', '6', '7', '8', '9']),
      '/javaScript/': genSidebarConfig('问题整理', ['array1', '1', '2']),
      '/yarn/': genSidebarConfig('yarn', ['1', '2', '3']),
      '/iconPicker/': genSidebarConfig('iconPicker', ['1', '2', '3', '4']),
      '/css1/': genSidebarConfig('iconPicker', ['is()']),
    }
  },
  logo: "/img/logo.png",
  plugins: [
    [
      '@vuepress/last-updated',
      {
        dateOptions: {
          hour12: false
        }
      }
    ]
  ]
}

function genSidebarConfig(title, children) {
  return [
    { title, children }
  ]
}